﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.Configuration;
using Pigmalion.BusinessEntities;
using Pigmalion.DataAccess;

namespace Pigmalion.BusinessLogics
{
    public partial class ProductoBL:IProductoBL
    {
        IProductoRepository ProductoRepository;

        public ProductoBL()
        {

            using (IUnityContainer container = new UnityContainer())
            {
                container.LoadConfiguration();
                ProductoRepository = container.Resolve<IProductoRepository>();

            }

            ProductoRepository = new ProductoRepository();
        }

        public List<Producto> GetAllFromProduto()
        {
            return ProductoRepository.GetAllFromProduto();
        }



        //public List<Producto> GetAllFromProduto()
        //{
        //    throw new NotImplementedException();
        //}
    }
}
